package com.epam.task.web.service.command;

import com.epam.task.web.service.AbstractAction;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * User: zhunusbekova.arailym
 */
public class Logout extends AbstractAction {
    @Override
    public String perform(HttpServletRequest request, HttpServletResponse response) {
        HttpSession session = request.getSession();
        session.removeAttribute("user");
        session.removeAttribute("locale");
        session.invalidate();
        return "/logout.jsp";
    }
}
